package com.situ.mall.controller.back;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.situ.mall.common.ServerResponse;
import com.situ.mall.service.IEchartsService;

@Controller 
@RequestMapping("/echarts")
public class EchartsController {
	
	@Autowired
	private IEchartsService echartsService;
	//跳转到echarts界面
	@RequestMapping("/getpage.action")
	public String echarts() {
		
		return "/echarts/echarts_list";
	}
	//向echarts传值
	@RequestMapping("/getCategoryCount")
	@ResponseBody
	public ServerResponse getCategoryCount() {
		
		return echartsService.getCategoryCount();
	}

}
